(function (aopc) {
    aopc.addExpandPage(839, function (get) {
        const Bridge = get('UtilsCommon', 'Bridge');

        return {
            expandInit() {
                this.subjectsProperty = this.getProperty('Subjects');
            },
            setFileVisible({ property, view }) {
                if (!property.data.Files || property.data.Files.length === 0) {
                    property.disabled = true;
                    return;
                }
                property.setIsExpand();
                const files = view.properties[1];
                files.isVisible = !files.isVisible;
                files.setIsVisible(files.isVisible);
            },
            setFileRow({ data, view }) {
                const file_icon = this.getViewProperty(view, 'file_icon');
                if (file_icon) {
                    file_icon.imgUrl = this.getFileIcon(data);
                }
            },
            getFileIcon(data) {
                const t = data.FileType.toLowerCase();
                const vt = '.mp4,.mov,.avi,.mkv,.rmvb';
                const it = '.jpg,.jpeg,.png,.gif,.svg';
                if (t === '.doc' || t === '.docx') return "/images/yxinmt_h5/25080313563175553.png";
                else if (t === '.xls' || t === '.xlsx') return "/images/yxinmt_h5/25080313565026910.png";
                else if (t === '.ppt' || t === '.pptx') return "/images/yxinmt_h5/25080313564674186.png";
                else if (t === '.pdf') return "/images/yxinmt_h5/25080313563543435.png";
                else if (vt.indexOf(t) >= 0) return '/images/yxinmt_h5/25080521052203829.png';
                else if (it.indexOf(t) >= 0) return '/images/yxinmt_h5/25080521052598726.png';
                else return "/images/yxinmt_h5/25080521052936371.png";
            },
            expandGetMeetingSubjectData({ entityData }) {
                entityData.queryString = "IsList=true";
                return entityData;
            },
            setIsVisible(p, v) {
                p.isVisible = v;
                p.setIsVisible && p.setIsVisible(v);
            },
            openFile({ property }) {
                const { MeetingId } = this.pageData;
                property.data.MeetingId = MeetingId;
                Bridge.openFile(property.data);
            }
        }
    });
})(window.aopc);